.class Lcom/waiqin365/lightapp/im/activity/ap;
.super Landroid/os/Handler;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 7

    const/4 v6, 0x0

    const/4 v5, 0x1

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->f(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)I

    move-result v0

    const/16 v1, 0xb

    if-ge v0, v1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0, v5}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->b(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;Z)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->g(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)Landroid/widget/TextView;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    const v2, 0x7f08085c

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    new-array v2, v5, [Ljava/lang/Object;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v4}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->f(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v6

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->f(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)I

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->h(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->i(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)Lcom/hyphenate/util/VoiceRecorder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/util/VoiceRecorder;->stopRecoding()I

    move-result v0

    if-lez v0, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->i(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)Lcom/hyphenate/util/VoiceRecorder;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hyphenate/util/VoiceRecorder;->getVoiceFilePath()Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v3}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->i(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)Lcom/hyphenate/util/VoiceRecorder;

    move-result-object v3

    iget-object v4, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v4}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->j(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lcom/hyphenate/util/VoiceRecorder;->getVoiceFileName(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-static {v0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v2, v3, v0, v6}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->a(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0, v5}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->c(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;Z)Z

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ap;->a:Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;->k(Lcom/waiqin365/lightapp/im/activity/CustomServiceChatActivity;)I

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x64
        :pswitch_0
    .end packed-switch
.end method
